1 	public int LockSeat(Seat seat, int status)
2 	{
3 		int result = -1;
4 		try
5 		{
6 			EntitySeat eSeat = (from s in db.Seats
7 								where s.id == seat.SeatId && s.status == "0" 
8 								select s).First();
9 			
10			eSeat.status = status.ToString();
11			result = db.SaveChanges();
12		}
13		catch (Exception e)
14		{
15			
16		}
17
18		return result;
19	}